package com.ychug.gateway.plugin;


import com.alibaba.druid.support.json.JSONUtils;
import com.baidu.ueditor.ActionEnter;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.ychug.common.constant.AdminConst;
import com.ychug.common.mapper.JsonMapper;
import com.ychug.common.utils.FileUtils;
import com.ychug.common.utils.FilesEx;
import com.ychug.common.utils.PathKit;
import com.ychug.common.utils.UploadFile;
import com.ychug.framework.util.ServletUtils;
import com.ychug.framework.web.base.BaseController;

import org.apache.commons.io.FilenameUtils;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.multipart.MultipartRequest;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Type;
import java.util.*;


/**
 * 百度编辑其上传图片
 */

@Controller
public class UeditorController extends BaseController {


    @RequestMapping("/")
    public String index(){
        return "ueditor";
    }

    @Autowired
    private ActionEnter actionEnter;

    @ResponseBody
    @RequestMapping("/ueditor/exec")
    public String exe(HttpServletRequest request){
        return actionEnter.exec(request);
    }



}
